package com.milling.business;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class GlobalVariable {
    /**
     * PLC通知PC上料托盘是否到位
     **/
/*
    public static int plc501Value = 0;

    public static int startValue = 0;

    public static boolean writeHolesFlag = false;

    */
/**
 * PLC通知PC上/下料机械手已到安全位置
 **//*

    public static int plc502Value = 0;

    */
/**
 * 配针托盘
 **//*

    public static int CONFIG_TRAY = 0;

    */
/**
 * 扫码到第几个盒子，旧托盘下料清空，初始化清空
 **//*

    public static int CONFIG_BOX_ID = 0;

    */
    /**
     * 记录扫码到的盒子码，旧托盘下料清空，初始化清空
     **//*

    public static String[] CONFIG_BOX_CODE = new String[16];
*/

    public static final String PLC_501_VALUE = "GlobalVariable:plc501Value";
    public static final String START_VALUE = "GlobalVariable:startValue";
    public static final String WRITE_HOLES_FLAG = "GlobalVariable:writeHolesFlag";
    public static final String PLC_502_VALUE = "GlobalVariable:plc502Value";
    public static final String CONFIG_TRAY = "GlobalVariable:CONFIG_TRAY";
    public static final String CONFIG_BOX_ID = "GlobalVariable:CONFIG_BOX_ID";
    public static final String CONFIG_BOX_CODE = "GlobalVariable:CONFIG_BOX_CODE";

    //#############################################################################//


    //    public static Map<String, String> ALREADY_CODES = new ConcurrentHashMap<>();
    public static String ALREADY_CODES = "GlobalVariable:ALREADY_CODES";

    //    public static Map<String, String> ALREADY_STORAGE_CODES = new ConcurrentHashMap<>();
    public static String ALREADY_STORAGE_CODES = "GlobalVariable:ALREADY_STORAGE_CODES";


    //#####################################配针任务 - 分拣任务相关变量#######################################
    public static int maxScanTimes = 3;

    //##########################################分拣任务相关变量############################################

    /*
        public static String GLOBAL_DRILL_SIZE = "0";

        public static String GLOBAL_DRILL_INFO = "";//50针同料号时记录

        public static String SORTING_BOX_CODE = "";

        public static int SORTING_BOX_ID = 0;

        public static String[] SORTING_BOX_CODEARRAY = new String[12];
    */
// 新增的全局变量
    public static final String GLOBAL_DRILL_SIZE = "GlobalVariable:globalDrillSize";
    public static final String GLOBAL_DRILL_INFO = "GlobalVariable:globalDrillInfo";
    public static final String SORTING_BOX_CODE = "GlobalVariable:sortingBoxCode";
    public static final String SORTING_BOX_ID = "GlobalVariable:sortingBoxId";
    public static final String SORTING_BOX_CODE_ARRAY = "GlobalVariable:sortingBoxCodeArray";
    /*public static void initConfigParam() {
        plc501Value = 0;
        startValue = 0;
        writeHolesFlag = false;
        plc502Value = 0;
        CONFIG_TRAY = 0;
        STORAGE_BOX_CODE = "";
        CONFIG_BOX_ID = 0;
        CONFIG_BOX_CODE = new String[16];
        maxScanTimes = 3;
        ALREADY_CODES = new ConcurrentHashMap<>();
        ALREADY_STORAGE_CODES = new ConcurrentHashMap<>();
    }*/

/*    public static void initSortingParam() {
        maxScanTimes = 3;
        GLOBAL_DRILL_SIZE = "0";
        SORTING_BOX_ID = 0;
        SORTING_BOX_CODE = "";
        SORTING_BOX_CODEARRAY = new String[12];
        GLOBAL_DRILL_INFO = "";
    }*/

}
